import { Text, StyleSheet, View } from 'react-native'
import React, { Component } from 'react'
import { createNativeStackNavigator } from '@react-navigation/native-stack'
import NewsScreen from '../screens/News'
import DetailScreen from '../screens/News/detail'

const Stack = createNativeStackNavigator()

export default class NewsStack extends Component {
  render() {
    return (
      <Stack.Navigator initialRouteName="NewsScreen"
        headerMode={'none'}
      >
        <Stack.Screen name="NewsScreen" component={NewsScreen}
          options={{
            title: '新闻',
            headerStyle: {
              backgroudColor: 'tomato'
            }
          }}
        />
        <Stack.Screen name="DetailScreen" component={DetailScreen}
          options={{
            title: '新闻详情',
            headerStyle: {
              backgroudColor: 'tomato'
            }
          }}
        />
      </Stack.Navigator>
    )
  }
}

const styles = StyleSheet.create({})